package com.example.demo.mapper;

import com.example.demo.entity.Userinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Author :蕉绿
 * @Date : 2023/3/14 19:29
 * @Version : V1.0
 * @Description :
 */
@Mapper
public interface UserMapper {
    //注册
    int reg(Userinfo userinfo);

    //登录  根据用户名查询user对象
    Userinfo getByUsername(@Param("username") String username);

    Userinfo getUserById(@Param("id")Integer id);


}
